<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/js/test.js"></script>
</head>
<body>
<h1>投票系统</h1>
<table>
    <tr><td>名称</td><td>详细描述</td><td>票数</td><td>投票</td></tr>
    <?php foreach($this->items as $item) :?>
    <tr>
        <td><?php echo $item['name']; ?></td>
        <td><?php echo $item['description']; ?></td>
        <td><?php echo $item['counts']; ?></td>
        <td><a href="<?php echo $this->url(array(
                                            'controller'=>'index', 
                                            'action'=>'vote', 
                                            'id' =>$item['id']));?>">投票
            </a>
        </td>
    </tr>
    <?php endforeach?>
</table>
</body>
</html>